home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 19 / Mac Magazin and MacEasy Magazine CD - Issue 19.iso / Grafik & Text & Film / Quark XTensions / Freeware Xtensions / XPress Scripts 1.0 / Lock⁄Unlock Guides / Lock⁄Unlock Guides next >
Text File  |  1994-08-10  |  979b  |  28 lines

  1. tell application "QuarkXPress 3.3"
  2.     activate
  3.     if document 1 exists then
  4.         tell document 1
  5.             if lock guides is true then
  6.                 copy (display dialog "Guides are currently locked." & return & ¬
  7.                     "OK to unlock guides?" buttons {"Cancel", "Unlock"} default button 2 with icon 2000) to x
  8.                 do updates
  9.                 if button returned of x is "Unlock" then
  10.                     set lock guides to false
  11.                 else if button returned of x is "Cancel" then
  12.                 end if
  13.             else if lock guides is false then
  14.                 copy (display dialog "Guides are currently unlocked." & return & ¬
  15.                     "OK to lock guides?" buttons {"Cancel", "Lock"} default button 2 with icon 2000) to x
  16.                 do updates
  17.                 if button returned of x is "Lock" then
  18.                     set lock guides to true
  19.                 else if button returned of x is "Cancel" then
  20.                 end if
  21.             else
  22.                 beep
  23.                 display dialog "This script requires an" & return & "open QuarkXPress document." buttons "OK" default button 1 with icon 1
  24.                 do updates
  25.             end if
  26.         end tell
  27.     end if
  28. end tell